Interface and Application Programming//

Sandwich

Input board to PC communication

For interface I used Processing (https://processing.org/) with my INPUT board with the photodetector INPUTboard-to-PC communication First I had to make sure I could have the input board communicate with the PC. My previous version of the input board (the Neil sample) had a Serial port and I had already tested I could read the photodetector value in the SerialMonitor. For my latest input board (for the final project) I had chosen I2C as communication, so now I had to make sure I could still communicate with the PC.

Steak

Modified code

I used the MOSI/SDA signal in my I2C and connected to the TX->RX cable of the FTDI-USB connector, I modified the Arduino code I had already and changed RX to PB0, and was able to see the value of the photodetector in the Serial Monitor. You can see the VIDEO.

Cherries

Processing 1

Then I started playing with Processing taking inspiration from other FabLab students and the example on internet. I used Birkin from Island and his amazing project LED quitar from last year. I took his code as a starting point (he also used a photodetector). I had Processing loading images (built-in library) and audio files (ddf.minim library) for the 2 scenarios (day and night)…that was fun!

Pasta and Wine

Processing 2

Once again, i used the if and else command to modify my code. I found a lot of similarities with arduino and online forums for process helped me a lot to add and modify commands to the code. In the same code i added pictures, and i changed their position in space.

Popsicle

Here comes the sun

It took me quite some time but finally i found out how to add sample music to my code. I found the songs, dowmloaded them and trimed them and i added them to the library path of processing. When there is light close to the photoresistor the beatles sing about it and a sun appears in the screen.

Salmon

Let's spend the night together

When there is no light in the room and the photosensor is not working then the Rollong stones sing a song for the night and a picture of the moon appears on the screen. Of course a tricky point was to modidy the delays and the sensibility of the code but i belive that in the end it worked perfectly.

Sandwich

Sound libraries

A step that i really want to document is the sound library of Processing and the tutorial that helped me. The library has alredy a lot of samples to use but also the choise to add, like i did twice, your own sample. It also gives you the code in order to integrate and modify.Of course the samples (and is the same fro the pictures)should be placed in the folder that is linked to the code with a path. In the end i really believe that Processing is the easiest and the most effective way to learn how to code ;-)

Croissant

My processing video

A simple picture cannot capture the joy and the interaction of the video, so....ENJOY!!!

Conclusions//

The conclusion of this week is that the in order for a designer to learn about coding you need to have a case study that you love and an software with an appealing working enviroment.

Links//

my processing VIDEO 1 Processing software Sound library Processing Libraries Processing tutorials, Birkir Þór,Fab Academy,

Files//

Download files